This invention relates to a disk drive with a PFA function and a monitor value saving control method in the disk drive.
In recent years, a magnetic disk drive with the function of predicting a failure in the drive beforehand (a PFA function: predictive failure analysis (PFA) mechanism) has been developed. The PFA function monitors, as the parameters for PFA, (the number of occurrences and the like of) various events that can contribute (have a close cause and effect relation) to failures in the magnetic disk drive and predicts a failure in the drive from the monitor values (parameter values). Such a PFA mechanism has been disclosed in, for example, U.S. Pat. No. 5,410,439 (issued to Egbert et al. on Feb. 22, 1994). The parameters are data items used to determine whether or not the drive is in a critical condition. Typical ones of the parameters include start-up time, the number of starts/stops of motor (the number of CSSs), the number of seeks, the number of substitute sectors (the number of times that spare sectors on the spare track preliminarily provided are substituted for defective sectors), power-on time, start retry (the number of times that the motor has been started by retry), the number of power cycles (the number of power ON operations), the number of occurrences of read errors (read error rate), and the number of occurrences of seek errors (seek error rate).
The aforementioned parameters change at various times, such as at the time of start-up of the drive or a read/write operation. Since the monitor value of a parameter of this type takes a unique value to the disk drive, it is necessary to save it in a nonvolatile storage medium (e.g., a disk or a nonvolatile memory). Saving the data in a nonvolatile storage medium, however, needs a lot of time. An event accompanying an operation required to be processed at high speeds is sometimes used as a parameter to be monitored, depending on the way that the parameter is decided. In this case, since sensing the relevant event and updating the monitor value can decrease the performance of the drive, the monitor value has to be saved in as short a time as possible.
To solve this problem, the monitor values of various parameters have been stored in a cache memory provided in the disk drive. Specifically, the monitor values of various parameters are temporarily stored in a volatile memory, such as a RAM, faster in access speed than a nonvolatile storage medium. In a situation where the performance is not affected, a monitor value saving process has been performed which saves the monitor values in the volatile memory into a nonvolatile storage memory (a nonvolatile memory or a disk).
The cache memory provided in the drive unit, however, has a limited memory capacity and is also used for various control actions, in addition to the storage of the aforementioned various parameters. For instance, the total capacity of the cache memory is 688 bytes, of which 535 bytes are used for control of the mechanical system of the drive unit and 33 bytes are used for communication with the host unit. In addition, 19 bytes are used for power saving, 35 bytes for read/write operation, 22 bytes for UART (Universal Asynchronous Receiver Transmitter), 5 bytes for security, and 12 bytes for work registers. The total number of bytes necessary for the above-described control operations is 661 bytes. As a result, the remaining 27 bytes are the number of bytes that can be used to save parameters for PFA. The parameters for PFA require 4 bytes for start-up time, 4 bytes for the number of CSSs, 4 bytes for the number of seeks, 2 bytes for the number of substitute sectors, 3 bytes for power-on time, 8 bytes for start retry (4 bytes for parameter 1, 2 bytes for parameter 2, and 2 bytes for parameter 3), 4 bytes for the number of power cycles, 4 bytes for seek error rate, and 4 bytes for read error rate, which come to 37 bytes in total and cannot be saved in the cache memory. This limits the number of parameters stored in the cache memory, causing the problem of failing to provide a satisfactory PFA function. On the other hand, the idea of increasing the capacity of the cache memory leads to the problem of raising cost.